import React,{Component} from 'react';
import Input from './Input';
import PercentageShower  from './PercentageShower';
require('../Comment.css');

class PercentageApp extends Component{
    constructor(){
        super()
        this.state={
            num:0
        }
    }
    handNunChange(number){
      this.setState({
          num:number
        })
    }
    
    render(){
        return(
            <div className='wrapper'>
                <Input onNumChange={this.handNunChange.bind(this)}></Input>
                <PercentageShower num={this.state.num}></PercentageShower>
            </div>
        )
    }

}

export default PercentageApp;